
window = global;
function decodeMap(str) {
	var result = [];
	for (var i = 0, l = str.length; i < l; i++) {
		if (result.indexOf(str[i]) === -1) {
			result.push(str[i]);
		}
	}
	return result;
}
function u(e) {
    return Object.prototype.toString.call(e) === "[object Object]"
}

function e() {
    var bn = window.ck;
    return bn ? decodeMap(bn) : null;
}


function n(n) {
    var r = arguments.length;
    return r ? r > 1 ? e.apply(t, arguments) : e.call(t, n) : e()
}

function transfer(arr, map) {
	var result = [];
	var len = map.length;

	for (var i = 0, l = arr.length; i < l; i++) {
		var num = 0;
		var bit = 0;
		for (var j = arr[i].length; j--;) {
			num += map.indexOf(arr[i][j]) * Math.pow(len, bit++);
		}
		result.push(num);
	}
	return result;
}


function decode(str, map) {
	var result = [];
	var resultCur = '';

	for (var i = 0, l = str.length; i < l; i++) {
		if (map.includes(str[i])) {
			resultCur += str[i];
		} else if (resultCur) {
			result.push(resultCur);
			resultCur = '';
		}
	}

	if (resultCur) {
		result.push(resultCur);
	}
	return result;
}
// v = "OkS/Mk"
// average = transfer(decode(v, map), map)
// console.log(average)

function decode_data(v,ck){

    window.ck = ck
    map = n()
    return transfer(decode(v, map), map)
}


ck = 'OBOSB{BxSnwx$B/VKwQ{FS</>StRn3VqVLq,+{U3p.d(+oX)4.T.1D<zgw}+YGd@(J?Mpf^0V|sYleg#o'
v =  'OA{tTA'
console.log(decode_data(v,ck))